
	$(document).ready(function() {
		try
		  {
		$('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" });
		$('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" });
		  }
		catch(err)
		  {
		  //Handle errors here
		  }
	});
	
	


try
{
	$(function(){
		//$('input').checkBox();
		$('#toggle-all').click(function(){
	 	$('#toggle-all').toggleClass('toggle-checked');
		$('#mainform input[type=checkbox]').checkBox('toggle');
		return false;
		});
	});
}
catch(err)
{
//Handle errors here
}



$(function(){
	//$('input').checkBox();
	$('#toggle-all').click(function(){
 	$('#toggle-all').toggleClass('toggle-checked');
	$('#mainform input[type=checkbox]').checkBox('toggle');
	return false;
	});
});

$(document).ready(function() {
	//$('.styledselect_pages').selectbox({ inputClass: "styledselect_pages" });
});

/*$(function() {
	$("input.file_1").filestyle({ 
	image: "images/forms/upload_file.gif",
	imageheight : 29,
	imagewidth : 78,
	width : 300
	});
});*/

/*$(function() {
	$('a.info-tooltip ').tooltip({
		track: true,
		delay: 0,
		fixPNG: true, 
		showURL: false,
		showBody: " - ",
		top: -35,
		left: 5
	});
});*/

/*$(function()
		{

		// initialise the "Select date" link
		$('#date-pick')
			.datePicker(
				// associate the link with a date picker
				{
					createButton:false,
					startDate:'01/01/2005',
					endDate:'31/12/2020'
				}
			).bind(
				// when the link is clicked display the date picker
				'click',
				function()
				{
					updateSelects($(this).dpGetSelected()[0]);
					$(this).dpDisplay();
					return false;
				}
			).bind(
				// when a date is selected update the SELECTs
				'dateSelected',
				function(e, selectedDate, $td, state)
				{
					updateSelects(selectedDate);
				}
			).bind(
				'dpClosed',
				function(e, selected)
				{
					updateSelects(selected[0]);
				}
			);
			
		var updateSelects = function (selectedDate)
		{
			var selectedDate = new Date(selectedDate);
			$('#d option[value=' + selectedDate.getDate() + ']').attr('selected', 'selected');
			$('#m option[value=' + (selectedDate.getMonth()+1) + ']').attr('selected', 'selected');
			$('#y option[value=' + (selectedDate.getFullYear()) + ']').attr('selected', 'selected');
		}
		// listen for when the selects are changed and update the picker
		$('#d, #m, #y')
			.bind(
				'change',
				function()
				{
					var d = new Date(
								$('#y').val(),
								$('#m').val()-1,
								$('#d').val()
							);
					$('#date-pick').dpSetSelected(d.asString());
				}
			);

		// default the position of the selects to today
		var today = new Date();
		updateSelects(today.getTime());

		// and update the datePicker to reflect it...
		$('#d').trigger('change');
		});
*/
/*$(document).ready(function(){
	$(document).pngFix( );
	$(".colorboxes").colorbox({width:"80%", height:"80%", iframe:true});
	});*/


$(function(){
	$('li a').click(function(){
		$('li').removeClass('sub_show');
		$('div').removeClass('show');
		$('ul').removeClass('current').addClass('select');
		$(this).parent().addClass('sub_show');
		$(this).parents('.select').addClass('current');
		$(this).parents('.select_sub').addClass('show');
	
	});
});